<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app"></div>
<script>
    const vueOpt = {
        data(){
            return {
                count: 2
            }
        },
        methods: {
            add: ()=>{
                // 箭头函数this指向创建箭头函数时，所在环境的this，如果未设置this，一直向上查找，this指向window
                console.log(this, this.count);
            }
        }
    }

    const app = Vue.createApp(vueOpt)
    const vm = app.mount('#app');
    vm.add();

</script>
</body>
</html>
